1. Field of the Invention
This invention relates to computer-based automated expression generation, and particularly to generating semantically valid eXtensible Markup Language (XML) path (XPath) expressions.
2. Description of Background
XPath is an expression language that allows the processing of values conforming to a defined data model. The data model provides a tree representation of eXtensible Markup Language (XML) documents as well as atomic values such as integers, strings, and Booleans, and sequences that may contain both references to nodes in an XML document and atomic values. The result of an XPath expression may be a selection of nodes from input documents, an atomic value, or more generally, any sequence allowed by the data model. XPath provides a means of hierarchically addressing the nodes in an XML tree using a path expression. XPath can take advantage of the type information that may be available when documents are validated using the XML Schema language, as defined by the World Wide Web Consortium (W3C). Since XML is a widely used language for a variety of applications with varying levels of hierarchical complexity, XPath has become an important tool to navigate through the hierarchical structure of an XML document using a compact, non-XML syntax.
As applications are developed that consume and process XPath expressions, such as XQuery engines to extract data from XML documents, many test cases must be developed to verify proper performance. To reduce development time and expense while providing robust test coverage of such applications, it would be beneficial to develop a method to automatically produce semantically valid XPath expressions. Such an automated approach could support development of a large number of test cases in a short period of time, covering a substantial amount of functionality provided through XPath expressions. Accordingly, there is a need in the art for a method to automatically generate semantically valid XPath expressions.